/*
 * Copyright (c) 2010-2013 Ruben Chakhmakhchyan. All rights reserved.
 * 
 * This file contains Original Code and/or Modifications of Original Code
 * as defined in and that are subject to the Eclipse Public License
 * Version 1.0 (the 'License'). You may not use this file except in
 * compliance with the License. Please obtain a copy of the License at
 * http://opensource.org/licenses/EPL-1.0 and read it before using this file.
 */

#pragma once

#include "plugin_model.h"
#include "result_codes.h"


__interface Plugin
{
public:

    //virtual ~Plugin() {}

    virtual PluginModel* getModel() = 0;
    virtual void setModel( PluginModel* pPluginModel ) = 0;

    virtual void* getWindowHandle() const = 0;
    virtual void updateView() = 0;

    virtual char* getUserAgent() = 0;
    virtual char* getUrl() = 0;

    virtual void setFocus() = 0;

    virtual void onError( ResultCode value ) = 0;
#ifndef _ADDON
    virtual void onUploadComplete( int uploadId, ResultCode resultCode ) = 0;
#endif
    virtual void onSaveComplete( int saveId, ResultCode resultCode ) = 0;
    virtual void onScanComplete( int numberOfPages ) = 0;
    virtual void onImageAcquired( int index ) = 0;
    virtual void onImageCountChanged( int count ) = 0;
    virtual void onSelectedImageChanged( int index ) = 0;
    virtual void onImagePropertiesChanged( int index ) = 0;
    virtual void onDeviceEvent( int event ) = 0;
    virtual void onZoomChanged() = 0;
    virtual void onToolStateChanged( int id, bool state ) = 0;
};
